//引入请求库
import http from "@/utils/http2.js";



/**
 * 修改货代询价信息
 * @param data
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export function updateForwarderInquiry(data) {
  return  http.put("/api/forwarderQuoteList/update",data);
}


/**
 * 查询货代询价信息
 * @param id
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export function getForwarderInquiryById(id,page,pageSize) {
  console.log('Request Params:', id,page,pageSize);
  return http.get(`/api/forwarderQuoteList/get/${id}/${page}/${pageSize}`); // 使用路径参数传递 id
}



/**
 * 查询后台货代询价信息
 * @param {*} data
 * @returns
 */
export function queryForwarderInquiry(data) {
  return http.post("/api/forwarderQuoteList/list", data);
}
/**
 * 保存货代询价单
 * @param {*} data
 * @returns
 */
export function saveForwarderInquiry(data) {
  return http.post("/api/forwarderQuoteList", data);
}
/**
 * 产品信息
 * @param {*} data
 * @returns
 */
export function queryForwarderProduct(data) {
  return http.post("/api/forwarderProduct/list", data);
}
/**
 * 根据询价单id查询相关的货品信息
 * @param InquiryId 客户询价单id
 * @returns
 */
export function queryCustomerInquiryDetailsByName(customer_name,page,pageSize) {
  console.log('Request Params:', customer_name,page,pageSize);
  return http.get(`/api/forwarderInquiry/detail/${customer_name}/${page}/${pageSize}`); // 使用路径参数传递 id
}

